package francis.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import francis.model.VideoInfo;
import francis.utils.VideoUtil;
import francis.utils.WebTools;

public class VideoDetailActivity extends Activity {
	ImageView mVideoDetailPic;
	TextView mVideoDetailTitle;
	TextView mVideoDetailPlayRev;
	TextView mVideoDetailTag;
	TextView mVideoDetailPage;
	Button mVideoDetailAsc;
	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.video_details);
		Intent intent=getIntent();
		VideoInfo vInfo = VideoUtil.getVideoInfo( intent.getStringExtra("aid"));
		mVideoDetailPic = (ImageView)this.findViewById(R.id.video_details_pic);
		Bitmap bitmap = WebTools.returnBitMap(vInfo.getPic());
		mVideoDetailPic.setImageBitmap(bitmap);
		mVideoDetailTitle = (TextView)this.findViewById(R.id.video_details_title);
		mVideoDetailTitle.setText("\t标题："+vInfo.getTitle());
		mVideoDetailPlayRev = (TextView)this.findViewById(R.id.video_details_playReview);
		mVideoDetailPlayRev.setText("\t播放：" + vInfo.getPlay()+ "\t\t评论：" + vInfo.getReview());
		mVideoDetailTag = (TextView)this.findViewById(R.id.video_details_tag);
		mVideoDetailTag.setText("Tag:" + vInfo.getTag());
		mVideoDetailPage = (TextView)this.findViewById(R.id.video_details_txtview_page);
		mVideoDetailPage.setText("剧集列表\t共" + vInfo.getPages() + "集(点击播放)");
		mVideoDetailAsc = (Button)this.findViewById(R.id.video_details_btn_openclose);
		mVideoDetailAsc.setText("∧反序");
		
	}

}
